/**
 * 
 */
package org.pdecodts.yasb.domain;

import java.util.Set;

/**
 * @author xsipds
 *
 */
public class Activity {

    /**
     * The container business process.
     * An activity always belong to a business process
     */
    private BusinessProcess container;
    
    /**
     * The name of the activity.
     * Activity names are unique inside the scope of a container.
     * 
     */
    private String name ;
    
    /**
     * The transition entering in the activity ;
     */
    private Set<Transition> incomingTransitions ;
    
    /**
     * The transitions levaing the activity ;
     */
    private Set<Transition> outgoingTransitions ;

    /**
     * @return the container
     */
    public BusinessProcess getContainer() {
        return container;
    }

    /**
     * @param container the container to set
     */
    public void setContainer(BusinessProcess container) {
        this.container = container;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the incomingTransitions
     */
    public Set<Transition> getIncomingTransitions() {
        return incomingTransitions;
    }

    /**
     * @param incomingTransitions the incomingTransitions to set
     */
    public void setIncomingTransitions(Set<Transition> incomingTransitions) {
        this.incomingTransitions = incomingTransitions;
    }

    /**
     * @return the outgoingTransitions
     */
    public Set<Transition> getOutgoingTransitions() {
        return outgoingTransitions;
    }

    /**
     * @param outgoingTransitions the outgoingTransitions to set
     */
    public void setOutgoingTransitions(Set<Transition> outgoingTransitions) {
        this.outgoingTransitions = outgoingTransitions;
    }
    
    public void addIncomingTransition (Transition trans) {
        this.incomingTransitions.add(trans) ;
    }
    
    public void addOutgoingTransition (Transition trans) {
        this.outgoingTransitions.add(trans) ;
    }
    
}
